Skip to content

Conversation

@Alessandro100
Copy link
Contributor

@Alessandro100 Alessandro100 commented Dec 10, 2025

Summary:

closes #1346

Feed Summary

  • Adds License as own group
  • Displays License ID -> Dialog displaying details
  • API call to get license (store) -> caches for 1 hour
  • Removed "See License" button at the top
  • Refactored GBFS Feed Info component to use new design
  • GtfsFeedSummary -> renamed -> FeedSummary
  • Updated Theme colors for warning and info to be more accessibility compatible
  • Included translations

Expected behavior:

When going on a feed that has a license id, you'll be able to see it in the feed summary area. If you click it, a dialog should appear showing the rules

If the feed only has a license url (no license id) it will display a link you can click on

If the feed does not have a license url, the license group will not show up

The GBFS feed info page has been updated

Testing tips:

  1. Go through random feeds and see if the license + license info displays correctly. Pay special attention to the wording (translations) and the GBFS page due to it's update

Please make sure these boxes are checked before submitting your pull request - thanks!

  • Run the unit tests with ./scripts/api-tests.sh to make sure you didn't break anything
  • Add or update any needed documentation to the repo
  • Format the title like "feat: [new feature short description]". Title must follow the Conventional Commit Specification(https://www.conventionalcommits.org/en/v1.0.0/).
  • Linked all relevant issues
  • Include screenshot(s) showing how this pull request works and fixes the issue(s)
Screenshot 2025-12-10 at 08 16 34 Screenshot 2025-12-10 at 08 10 54 Screenshot 2025-12-10 at 08 10 44 Screenshot 2025-12-10 at 08 10 40 Screenshot 2025-12-10 at 08 05 09 Screenshot 2025-12-10 at 09 27 55

@Alessandro100 Alessandro100 self-assigned this Dec 10, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements a comprehensive redesign of the license details UI and feed summary components. The changes introduce a new dialog-based license viewer that displays structured license rules (permissions, conditions, limitations) and consolidates the GBFS and GTFS feed information displays into a single unified component.

Key Changes:

  • Added a new license Redux store with saga for fetching and caching license details
  • Created a LicenseDialog component that displays license rules categorized by type with color-coded visual indicators
  • Consolidated GbfsFeedInfo and GtfsFeedSummary into a single FeedSummary component that handles all feed types
  • Updated theme colors for warning and info to improve accessibility
  • Removed redundant "See License" button from feed header

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
web-app/src/app/types.ts Adds license profile action types and error handling types
web-app/src/app/store/saga/root-saga.ts Registers the new license saga watcher
web-app/src/app/store/saga/license-saga.ts Implements license fetching with 1-hour caching logic
web-app/src/app/store/reducers.ts Integrates license reducer into root state
web-app/src/app/store/license-selectors.ts Provides selector functions for license state access
web-app/src/app/store/license-reducer.ts Manages license loading state and cached data
web-app/src/app/services/feeds/index.ts Adds API endpoint for fetching license details
web-app/src/app/screens/Feed/index.tsx Removes license button, switches to unified FeedSummary component
web-app/src/app/screens/Feed/components/LicenseDialog.tsx New dialog displaying license rules with categorized sections
web-app/src/app/screens/Feed/components/GbfsFeedInfo.tsx Deleted (functionality moved to FeedSummary)
web-app/src/app/screens/Feed/components/FeedSummary.tsx Unified component supporting GTFS, GTFS-RT, and GBFS feeds with license integration
web-app/src/app/screens/Feed/components/FeedAuthenticationSummaryInfo.tsx Deleted (functionality consolidated into FeedSummary)
web-app/src/app/screens/Feed/components/CopyLinkElement.tsx Adds 'internal' link type support for triggering dialog actions
web-app/src/app/components/CoveredAreaMap.tsx Removes conditional GBFS border styling
web-app/src/app/Theme.ts Updates warning and info colors for better accessibility
web-app/public/locales/en/feeds.json Adds translations for license dialog and feed summary labels
web-app/public/locales/en/common.json Adds common translations for UI elements

{t('license.contributeMessage')}
</Typography>
<Link
href={`https://github.com/MobilityData/licenses-aas/blob/main/data/licenses/${license.id}.json`}
Copy link

Copilot AI Dec 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The GitHub repository URL is hardcoded. Consider moving this to a configuration constant or environment variable to make it easier to maintain if the repository location changes.

Copilot uses AI. Check for mistakes.
@github-actions
Copy link

github-actions bot commented Dec 10, 2025

*Lighthouse ran on https://mobility-feeds-dev--pr-1519-q76db6ib.web.app/ * (Desktop)
⚡️ HTML Report Lighthouse report for the changes in this PR:

Performance Accessibility Best Practices SEO
🟠 69 🟢 100 🟢 100 🟢 100

*Lighthouse ran on https://mobility-feeds-dev--pr-1519-q76db6ib.web.app/feeds * (Desktop)
⚡️ HTML Report Lighthouse report for the changes in this PR:

Performance Accessibility Best Practices SEO
🟠 64 🟢 91 🟢 100 🟢 100

*Lighthouse ran on https://mobility-feeds-dev--pr-1519-q76db6ib.web.app/feeds/gtfs/mdb-2126 * (Desktop)
⚡️ HTML Report Lighthouse report for the changes in this PR:

Performance Accessibility Best Practices SEO
🟠 70 🔴 0 🟢 93 🟢 100

*Lighthouse ran on https://mobility-feeds-dev--pr-1519-q76db6ib.web.app/feeds/gtfs_rt/mdb-2585 * (Desktop)
⚡️ HTML Report Lighthouse report for the changes in this PR:

Performance Accessibility Best Practices SEO
🟢 90 🟠 87 🟢 100 🟢 100

*Lighthouse ran on https://mobility-feeds-dev--pr-1519-q76db6ib.web.app/gbfs/gbfs-flamingo_porirua * (Desktop)
⚡️ HTML Report Lighthouse report for the changes in this PR:

Performance Accessibility Best Practices SEO
🟢 99 🟢 100 🟢 100 🟢 100

@github-actions
Copy link

Preview Firebase Hosting URL: https://mobility-feeds-dev--pr-1519-q76db6ib.web.app

@Alessandro100 Alessandro100 force-pushed the feat/1346-license-details-ui branch from 296ebcd to 9d018ca Compare December 10, 2025 15:08
@emmambd
Copy link
Collaborator

emmambd commented Dec 10, 2025

@Alessandro100 This is great! Is there a good example for GTFS as well? I'm having trouble finding an example feed.

My only thought for improvement is that the SPDX breakdown is so clear and visually beautiful that I don't want people to miss it. Only presenting it after clicking on the license type feels too easy to miss to me.

Thoughts on adding a button that says "License Detail Summary" or a visual element that's similar? This is so useful I don't want anyone to miss it.

@davidgamez
Copy link
Member

@Alessandro100 This is great! Is there a good example for GTFS as well? I'm having trouble finding an example feed.

My only thought for improvement is that the SPDX breakdown is so clear and visually beautiful that I don't want people to miss it. Only presenting it after clicking on the license type feels too easy to miss to me.

Thoughts on adding a button that says "License Detail Summary" or a visual element that's similar? This is so useful I don't want anyone to miss it.

Few examples:

@emmambd
Copy link
Collaborator

emmambd commented Dec 10, 2025

Thanks @davidgamez! I should have thought to look at the French data to check. No new comments from me — only the one above, where I want to make sure this amazing feature gets the attention it deserves!

@Alessandro100
Copy link
Contributor Author

Updated version, thoughts?
Screenshot 2025-12-10 at 13 36 32

@emmambd
Copy link
Collaborator

emmambd commented Dec 10, 2025

@Alessandro100 Perfect. All good on my end. I won't approve the PR so code review can still continue.

string,
{ license: License; fetchedAt: number }
>;
// License data rarely changes, but we use a 1-hour cache duration to ensure
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Member

@davidgamez davidgamez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🎖️

@Alessandro100 Alessandro100 merged commit e38e7b1 into main Dec 10, 2025
4 checks passed
@Alessandro100 Alessandro100 deleted the feat/1346-license-details-ui branch December 10, 2025 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add detailed license information to the feed summary screen

4 participants